<?
	require "lib.php";
	
	if(!boardExists($_GET["bid"])) alertAndBack("존재하지 않는 게시판 입니다!");
	if(!checkLogin()) { alertAndMove("로그인을 하셔야 합니다!", "login.php"); exit; }
	else {
		$board_info = boardInfo($_GET["bid"]);
		if($board_info["writeadmin"] == "1") { alertAndBack("권한이 없습니다!"); exit; }
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
	<title> IWOP BOARD ALPHA </title>
</head>
<body>
	<form action="insert.php?bid=<?echo $_GET["bid"];?>" method="post">
		<table border="1">
			<tr>
				<td>제목</td>
				<td><input type="text" name="title" size="50" maxlength="50" /></td>
			</tr>
			<tr>
				<td>내용</td>
				<td><textarea name="content" cols="45" rows="20"></textarea></td>			
			</tr>
			<tr>
				<td colspan="2"><input type="submit" value="올리기" /><input type="reset" value="초기화" /></td>
			</tr>
		</table>
	</form>
</body>
</html>
<? } ?>